package de.iritgo.skillfull.collision;


import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;

import de.iritgo.skillfull.component.CollisionComponent;
import de.iritgo.skillfull.component.CollisionComponentImpl;

/**
 * The collision manager. He checks all entities for collisions. He
 * use a quad tree algo to optimize the checks.
 * 
 * @author held
 */
public interface CollisionManager 
{
	/**
	 * This renders debug information on the screen
	 * 
	 * @param container The slick container
	 * @param g The graphics
	 */
	public void render (GameContainer container, Graphics g);

	/**
	 * Add a collision component to manager. The collision component
	 * is sorted in the tree.
	 * 
	 * @param collisionComponent The collision component
	 */
	public void add (CollisionComponent collisionComponent);

	/**
	 * Remove a collision component from the manager and the quad tree.
	 * 
	 * @param collisionComponent The collision component
	 */
	public void remove (CollisionComponent collisionComponent);

	/**
	 * Checks all entities and fire up collisions events
	 * 
	 * @param container The container
	 * @param delta The delta between method calls
	 */
	public void update(GameContainer container, int delta);
}
